package com.example.demo.spring.service;

import com.example.demo.spring.spring.LiukaiApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @className: Test
 * @copyright: Copyright (C) 2019-2028, Inc. All rights reserved.
 * @company: 中兴新云.财务云
 * @author: 刘凯
 * @date: 2024/7/3
 * @Description: com.example.demo.spring.service
 */
public class Test {

    public static void main(String[] args) {

//        LiukaiApplicationContext liukaiApplicationContext = new LiukaiApplicationContext(AppConfig.class);
        AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
//        UserServiceInterface userService = (UserServiceInterface) liukaiApplicationContext.getBean("userService");
//        System.out.println(liukaiApplicationContext.getBean("LiukaiBeanPostProcessor"));
//        userService.test();
        JdbcService jdbcService = (JdbcService) annotationConfigApplicationContext.getBean("jdbcService");
        jdbcService.test();
        System.out.println(jdbcService);
    }
}
